#include<bits/stdc++.h>
using namespace std;
const int N = 1e5+10;
vector<pair<int,int>> bian[N];
int l,r;
struct segment_tree{
    double atag[N*80];
    double ma[N*80];
    int ls[N*80];
    int rs[N*80];
    int pcnt;
    inline void copy(int &now,int cop){
        now = ++pcnt;
        ma[now] = ma[cop];
        atag[now] = atag[cop];
        ls[now] = ls[cop];
        rs[now] = rs[cop];
    }
    void update1(int &now,int cop,int l,int r,int x,int y,double val){
        copy(now,cop);
        if(x <= l && r <= y){
            atag[now] += val;
            ma[now] += val;
            return;
        }
        int mid = (l + r)/2;
        if(x <= mid ){
            update1(ls[now],ls[cop],l,mid,x,y,val);
        }
        if(mid < y){
            update1(rs[now],rs[cop],mid+1,r,x,y,val);
        }
        ma[now] = max(ma[ls[now]],ma[rs[now]]) + atag[now];
    }
    void update2(int &now,int cop,int l,int r,int p,double val){
        copy(now,cop);
        if(l == r){
            ma[now] = max(ma[now],val);
            return;
        }
        int mid = (l + r)/2;
        if(p <= mid){
            update2(ls[now],ls[cop],l,mid,p,val - atag[now]);
        }else{
            update2(rs[now],rs[cop],mid+1,r,p,val - atag[now]);
        }
        ma[now] = max(ma[ls[now]],ma[rs[now]]) + atag[now];
    }
    double query(int now,int l,int r,int x,int y){
        if(x <= l && r <= y){
            return ma[now];
        }
        int mid = (l + r)/2;
        double mav = -1e15;
        if(x <= mid){
            mav = max(mav,query(ls[now],l,mid,x,y));
        }
        if(mid < y){
            mav = max(mav,query(rs[now],mid+1,r,x,y));
        }
        return mav + atag[now];
    }
}sg;
int n;
int dfn[N];
int dft;
int rnk[N];
int mdep[N];
int son[N];
int rot[N];
int sonv[N];
int fath[N];
void dfs1(int x,int fa){
    fath[x] = fa;
    rot[x] = 0;
    mdep[x] = 1;
    son[x] = 0;
    sonv[x] = 0;
    for(pair<int,int> e : bian[x]){
        int v = e.first;
        int w = e.second;
        if(v == fa){
            continue;
        }
        dfs1(v,x);
        mdep[x] = max(mdep[x],mdep[v] + 1);
        if(mdep[son[x]] < mdep[v]){
            son[x] = v;
            sonv[x] = w;
        }
    }
}
double cans,cres;
void dfs2(int x,int tf){
    dfn[x] = ++dft;
    if(son[x]){
        dfs2(son[x],tf);
        rot[x] = rot[son[x]];
        sg.update1(rot[x],rot[x],1,n,dfn[x] + 1,dfn[x] + mdep[x] - 1,sonv[x] - cans);
    }
    sg.update2(rot[x],rot[x],1,n,dfn[x],0);
    for(pair<int,int> e : bian[x]){
        int v = e.first;
        int w = e.second;
        if(v == fath[x] || v == son[x]){
            continue;
        }
        dfs2(v,v);
        for(int i = 1;i <= mdep[v];i++){
            if(r > i && mdep[x] + i > l){
                cres = max(cres,sg.query(rot[x],1,n,dfn[x] + max(0,l - i),dfn[x] + min(mdep[x] - 1,r - i)) + sg.query(rot[v],1,n,dfn[v] + i - 1,dfn[v] + i - 1) + w - cans);
            }
        }
        for(int i = 1;i<= mdep[v];i++){
            sg.update2(rot[x],rot[x],1,n,dfn[x] + i,sg.query(rot[v],1,n,dfn[v] + i - 1,dfn[v] + i - 1) + w - cans);
        }
    }
    if(l < mdep[x]){
        cres = max(cres,sg.query(rot[x],1,n,dfn[x] + l,dfn[x] + min(mdep[x] - 1,r)));
    }
}
inline double solve(double as){
    sg.pcnt = 0;
    sg.ma[0] = -1e15;
    dft = 0;
    cans = as;
    cres = -1e15;
    dfs2(1,1);
    return cres;
}
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cin>>n;
    cin>>l>>r;
    double l = 0,r = 0;
    for(int i = 1;i<n;i++){
        int u,v,z;
        cin>>u>>v>>z;
        bian[u].push_back(make_pair(v,z));
        bian[v].push_back(make_pair(u,z));
        r = max(r,z*1.0);
    }
    dfs1(1,0);
    while(r - l > 2e-4){
        double mid = (l + r)/2;
        if(solve(mid) > 0){
            l = mid;
        }else{
            r = mid;
        }
    }
    cout<<fixed<<setprecision(3)<<(l + r)/2<<'\n';
}